Apply buildQueryKey across entire library for object data parity#1596
Open
JonnyWong16 wants to merge 3 commits intopushingkarmaorg:masterfrom
Open
Apply buildQueryKey across entire library for object data parity#1596JonnyWong16 wants to merge 3 commits intopushingkarmaorg:masterfrom
buildQueryKey across entire library for object data parity#1596JonnyWong16 wants to merge 3 commits intopushingkarmaorg:masterfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR expands usage of the shared _buildQueryKey helper across PlexAPI object-fetching methods to consistently include includeGuids and other query params, improving response parity for partial/related object lookups.
Changes:
- Replaced hand-built query strings (and some plain keys) with
_buildQueryKey(...)across video/audio/photo/playlist/library/collection/mixins. - Updated
PlexObject._buildQueryKeyto correctly append parameters when the input key already contains an existing query string (?). - Standardized a few fetch patterns by building the key first, then calling
fetchItem/fetchItems.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| plexapi/base.py | Fixes _buildQueryKey to merge params with keys that already contain ?. |
| plexapi/library.py | Applies _buildQueryKey to hubs/onDeck/recentlyAdded/search/tag/filter fetches. |
| plexapi/video.py | Applies _buildQueryKey to onDeck and parent/grandparent fetches for show/season/episode relations. |
| plexapi/audio.py | Applies _buildQueryKey to nearest/allLeaves/parent relations and station fetches. |
| plexapi/photo.py | Applies _buildQueryKey to children/parent lookups for albums/photos/clips. |
| plexapi/playlist.py | Applies _buildQueryKey to playlist item retrieval endpoint. |
| plexapi/collection.py | Applies _buildQueryKey to collection children retrieval. |
| plexapi/mixins/objects.py | Applies _buildQueryKey to extras and related hubs mixins. |
| plexapi/media.py | Applies _buildQueryKey to media tag items() retrieval. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Apply the
_buildQueryKeyfunction from #1593 across the entire PlexAPI library to ensure data parity in all object responses.Type of change
Please delete options that are not relevant.
Checklist: